package com.qiang.enums;

import java.io.Serializable;

/**
 *
 */
public enum ExceptionCode implements Serializable {

	SUCCESS(200, "操作成功"),
	PATH_ERROR(404, "路径错误"),
	DEFEATED(1000, "服务异常"),
	CANNOT_REQUE_AGAIN(201, "已处理,不能重复请求"),
	ILLEGAL_PARAM(103, "请求缺少参数"),
	ILLEGAL_METHOD(104, "不支持的请求方法"),
	ILLEGAL_BODY(105, "不合法的请求包体,需要json格式"),
	USER_ID_NULL(1011,"用户ID不能为空"),
	USER_NAME_NULL(1012,"用户名不能为空"),
	PASSWORD_NULL(1013,"密码不能为空"),
	USER_IS_NOT(1007,"用户名不存在"),
	PASSWORD_IS_FAIL(1008,"用户密码错误"),
	USER_BUTTON(1009,"获取用户权限按钮异常"),
	USER_EX(1010,"获取用户信息异常"),
	ACCECC_TOKEN_INVALID(1011,"登录信息已失效,请重新登录"),
	PICCODE(1012,"验证码错误"),
	NO_PICCODE(1013,"验证码失效"),
	user_permiss_error(1014,"用户无此操作权限"),
	Role_param_error(1015,"用户角色信息为空"),
	UPDATE_SOURCE_FAIL(1016,"用户来源为空"),
	TIME_OUT(1017, "请求超时"),
	SQL_EXCEPTION(1018, "SQL异常"),


	;
	private Integer code;
	private String message;

	ExceptionCode(Integer code, String message) {
		this.code = code;
		this.message = message;
	}
	
	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}
}
